import { getStore } from '@/util/store'

const dic = {
  test_type: [
    {
      label: '准入考评',
      value: '1'
    },
    {
      label: '周期性考评',
      value: '2'
    }
  ],
  cycle_type: [
    {
      label: '年度',
      value: '1'
    },
    {
      label: '季度',
      value: '2'
    },
    {
      label: '月度',
      value: '3'
    }
  ]
}

export const option = function () {
  return {
    labelWidth: 120,
    emptyBtn: false,
    submitBtn: false,
    detail: ['view'].includes(this.type),
    column: [
      {
        label: '关系管理名称',
        span: 8,
        prop: 'relationName',
        maxlength: 100,
        rules: [{ required: true, message: '请输入关系管理名称', trigger: 'blur' }]
      },
      {
        label: '关系管理编号',
        span: 8,
        prop: 'relationCode',
        maxlength: 100,
        disabled: true
      },
      {
        label: '创建人',
        span: 8,
        prop: 'createUser',
        maxlength: 100,
        disabled: true,
        value: getStore({ name: 'userInfo' }).user_name
      },
      {
        label: '创建日期',
        span: 8,
        prop: 'createTime',
        type: 'date',
        format: 'yyyy-MM-dd',
        valueFormat: 'yyyy-MM-dd',
        maxlength: 100,
        disabled: true,
        value: new Date()
      },
      {
        label: '备注',
        prop: 'remark',
        type: 'textarea',
        placeholder: '',
        maxlength: 500,
        minRows: 6,
        maxRows: 8,
        span: 24
      }
    ]
  }
}
